package org.jeecg.modules.fk.service.call;

import com.alibaba.fastjson.JSON;
import org.jeecg.modules.fk.vo.req.bszs.FkReportRcreateHisDTO;
import org.jeecg.modules.fk.vo.req.bszs.QueryFkReportRcreateHisDTO;
import org.jeecg.modules.fk.properties.TaxProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 到办税助手查询风险
 */
@Slf4j
@Service
public class FkReportRcreateHisService {

    @Resource
    private TaxProperties bszsProperties;

    @Resource
    private FkBszsApiBaseCall fkBszsApiBaseCall;

    public List<FkReportRcreateHisDTO> listFkReportRcreateHis(List<QueryFkReportRcreateHisDTO> queryDTOList) {

        String resultStr = this.fkBszsApiBaseCall.postJsonParamReturnOneLevelCall(true, "查询风险报告重新生成日志记录",null,bszsProperties.getListFkReportRcreateHisUrl(), null, queryDTOList);
        //将放回结果转换成实体
        List<FkReportRcreateHisDTO> fkReportRcreateHisDTOS = JSON.parseArray(resultStr, FkReportRcreateHisDTO.class);
        return fkReportRcreateHisDTOS;
    }

}
